Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carbon v11 Button #1642

Merged
merged 2 commits into from
Feb 7, 2023
Merged

Carbon v11 Button #1642

merged 2 commits into from
Feb 7, 2023

Conversation

theetrain
Copy link
Collaborator

@theetrain theetrain commented Jan 29, 2023

Closes #1641

  • forward focus and blur events
  • provide button role for custom elements using 'as'
  • BREAKING CHANGE: danger-tertiary and danger-ghost props were renamed to danger--tertiary and danger--ghost (two dashes instead of one)

Follow-ups:

  • ComposedModal vertically centres Button copy, but it should be resolved once the Modal adopts v11 SCSS

@theetrain theetrain requested a review from metonym January 29, 2023 02:13
@theetrain theetrain marked this pull request as draft January 29, 2023 02:26
@theetrain
Copy link
Collaborator Author

theetrain commented Jan 29, 2023

Todo

- forward focus and blur events
- provide button role for custom elements using 'as'

BREAKING CHANGE: danger-tertiary and danger-ghost props were renamed to danger--tertiary and danger--ghost
BREAKING CHANGE: buttons now have a larger minimum width
@theetrain theetrain marked this pull request as ready for review February 5, 2023 02:59
@theetrain
Copy link
Collaborator Author

I decided to keep the as prop for now; I'll wait for a response in the flagship repo in carbon-design-system/carbon#13045

At least I added role="button" that can be overridden with $$restProps so that users of as won't ship inaccessible custom buttons.

Tests won't pass for the time-being; we'll need to refactor imports, and svelte-package needs to pick up typedef items in JSDoc.

Copy link
Collaborator

@metonym metonym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, the minimal diffs made this easy to review

@theetrain theetrain merged commit 22d2bef into feat/carbon-v11 Feb 7, 2023
@theetrain theetrain deleted the feat/v11-button branch February 7, 2023 03:28
@theetrain theetrain mentioned this pull request Feb 7, 2023
theetrain added a commit that referenced this pull request Feb 11, 2023
* feat(button): adopt v11 styles

- forward focus and blur events
- provide button role for custom elements using 'as'

BREAKING CHANGE: danger-tertiary and danger-ghost props were renamed to danger--tertiary and danger--ghost
BREAKING CHANGE: buttons now have a larger minimum width

* test: update button test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants